package com.github.prontera.domain.enums;

import com.github.prontera.common.mybatis.handler.CodeEnum;

/**
 * 通用枚举类型
 */
public enum OrderTypeEnum implements CodeEnum<OrderTypeEnum> {

	RECHARGE_BEAN(0, "充值唐豆豆"),TALENT(1, "达人订单"),VIP(2, "购买VIP")
	,BUY_ACTIVITY(3, "支付参与活动"),ISSUE_PAY(4, "红包提问"),WECHAT_PAY(5, "查看微信"),RECHARGE(6, "余额充值") ,TAKS_DEPOSIT_AMOUNT(7, "任务保证金")
	;

	private int code;
	private String desc;
	

	/**
     * 通过枚举<code>name</code>获取枚举
     */
    public static OrderTypeEnum getEnumByCode(Integer code) {
    	if(code==null){
    		return null;
    	}
        for (OrderTypeEnum enumm : OrderTypeEnum.values()) {
            if (enumm.getCode()==code.intValue()) {
                return enumm;
            }
        }
        return null;
    }
	
	private OrderTypeEnum(int code, String desc) {
		this.code = code;
		this.desc=desc;
	}

	@Override
	public int getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}

}
